# -*- coding: utf-8 -*-
from PyQt4 import QtGui

from ui.uiAddDb import UiAddDb
from db.dataBase import DataBase
from actions.actionsUiAddDb import ActionsUiAddDb


class RunnerUiAddDb(QtGui.QDialog):

    def __init__(self, parent = None):
        """
            Construtor da classe.
        """
        QtGui.QDialog.__init__(self, parent)
        self.setupUi()



    def setupUi(self):
        """
            Instancia e inicia os modulos necessarios.
        """
        self.uiAddDb = UiAddDb()
        self.uiAddDb.setupUi(self)
        self.db = DataBase()
        self.actionsUiAddDb = ActionsUiAddDb(self.uiAddDb, self.db)



    def run(self):
        """
            Metodo para rodar a aplicacao.
        """
        self.uiAddDb.dialog.show()
